Utilities
Overview
API utility functions. Utilities for general operations to simplify methods or for items that are not accessible through API objects.
- From version: 2020.20
Methods
findUserOrRolesContains
findUserOrRolesContains ( contains ? : string): Contact []
This function returns an array of all of the Users and Roles based on a search that contains part of the search string. You should use it for searching and filtering the Users and Roles list.
const adminUsersOrRoles = workflowApi.utilities.findUserOrRolesContains('Admin');
Parameters
-
Optionalcontains:string
The string to search with.
Returns Contact[]
An array of all of the Users and Roles that contains part of the input string.
getUsersAndRoles
getUsersAndRoles ( startFrom ? : number): Contact []
This function returns an array of all the Users and Roles that could be using the current Workflow App. You should use it for displaying and getting user settings for your workflow.
workflowApi.utilities.getUsersAndRoles().forEach(function(contact){
console.log("You can display all users and roles in HTML element")
});
Parameters
-
OptionalstartFrom:number
Optional - In which start index position of users and roles to fetch from.
Returns Contact[]
Array of all the Users and Roles that could be using the current Workflow App